//
//  RightCodeTool.m
//  Runone
//
//  Created by runone02 on 16/9/29.
//  Copyright © 2016年 runone. All rights reserved.
//

#import "RightCodeTool.h"
#import "AppLocalManager.h"
#import "Define.h"

static RightCodeTool *_singleton = nil;
@implementation RightCodeTool

//string	__NSCFString *	@"P01,P02,P0201,P020401,P03,P0301,P030101,P030102,P030103,P0302,P0303,P0304,P030401,P030402,P0306,P04,P04010101,P04010103,P04010201,P04010203,P04010204,P040201,P040202,P040405,P05,"	0x000000017418e6c0
- (BOOL) rightIsEqualTO:(NSString *)str {
    NSString *string = GetSys_RightCode;
    BOOL reBack = false ;
    NSArray *array = [string componentsSeparatedByString:@","];
    for (int i = 0; i < array.count; i++) {
        if ([str isEqualToString:array[i]]) {
           reBack = YES ;
        }
    }
    return reBack;
}

+ (instancetype)sharedTool {
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _singleton = [[RightCodeTool alloc] init];
    });
    return _singleton;
}

//+ (BOOL) rightIsEqualTOClass:(NSString *)str {
//    NSString *string = GetSys_RightCode;
//    BOOL reBack = false ;
//    NSArray *array = [string componentsSeparatedByString:@","];
//    for (int i = 0; i < array.count; i++) {
//        if ([str isEqualToString:array[i]]) {
//            reBack = YES ;
//        }
//    }
//    return reBack;
//}


@end
